For those with some familiarity with Tony Myles' original SpriteWorld, a comparison of the two versions is in order. This release of SpriteWorld is a collaborative production of Vern Jensen and Karl Bunker. Karl Bunker rewrote much of the core SpriteWorld code, and Vern Jensen added the scrolling and tiling routines that appear in this version of SpriteWorld. Both of us provided many improvements and fixes that are sprinkled throughout SpriteWorld 2.
Many changes have been made to introduce new capabilities and features, and other changes were necessary in order to fix some of SpriteWorld 1.0's problems. There are changes to the parameters used in some SpriteWorld calls, new calls, and changes in the actions performed by some of the calls. In general, you should treat this release of SpriteWorld as a new product.
Major bug fixes in this version of SpriteWorld:
+ Myles' SpriteWorld would only work reliably if its window was on the main monitor of a multi-monitor system. This has been fixed.
+ SpriteWorld previously did not correctly support a "worldRect" smaller than the full rect of the parent window. Fixed.
+ When using the direct-to-screen blitter, SpriteWorld would only work if the window was positioned at the top of the monitor, and the window width was divisible by 4. Fixed.
+ BlitPixie would sometimes crash when drawing a 1-pixel-high section of a sprite; fixed.
+ BlitPixie would sometimes crash under 24-bit memory mode; fixed.
Notable enhancements in this version of SpriteWorld:
+ SpriteWorld now supports "single pict" Sprites. These are Sprites in which all the Frame images for the Sprite are in a single pict. These Sprites can save disk space and are quicker to initialize.
+ "Self-masking" Sprites that don't require a separate mask image are now supported.
+ SpriteWorld 2 includes a set of pixel-precise and radius-based collision detection routines.
+ SWSetSpriteWorldMaxFPS provides an easy way to control the overall speed of animation.
+ Synchronization with a monitor's VBL interrupt is now an option, allowing smoother animation in some circumstances.
+ A highly useful SWRemoveSpriteFromAnimation routine has been introduced.
+ Compiled Sprites can now be compiled "on the fly" at run time rather than requiring an additional step during project development.
+ "Idle" compiled Sprites are now updated correctly when overlapped by moving Sprites.
+ The PPC version of BlitPixie now works correctly with Sprites whose width is not divisible by 4, and with "worldRects" not divisible by 8.
+ A new depth-independent blitter has been introduced for the 68K version of SpriteWorld, providing a considerable improvement over CopyBits for monitor depths less than 8 bits. (The original BlitPixie8Bit is still recommended for 8 bit depth.)
+ SpriteWorld now has brand-new scrolling routines which allow you to easily create scrolling games that run very fast and allow you to scroll around in a very large "virtual world", without having to create a huge GWorld for the background. See the file "SpriteWorld - Scrolling" for more information.
+ Also new in this release are some very useful tiling routines. Tiling is a way of building a background by putting together various "tiles", which allows you to have a large background without taking up a lot of memory or requiring a lot of disk space. Nearly all Nintendo type games use tiling. You can use the tiling routines in both scrolling and non-scrolling SpriteWorlds. See the file "SpriteWorld - Tiling" for more information.
Notable changes in this version of SpriteWorld:
+ SWFastAnimateSpriteWorld and SWBlastAnimateSpriteWorld no longer exist. They have been consolidated into SWAnimateSpriteWorld.
+ A Sprite's "deltas" are no longer automatically added to a Sprite's position by SWProcessSpriteWorld. This is now the responsibility of the user-installed moveProc.
+ If a moveProc moves a sprite by some means other than calling a SpriteWorld routine (such as SWOffsetSprite), it is now the moveProc's responsibility to set the srcSpriteP->needsToBeDrawn flag to "true".
+ SWBounceSpriteMoveProc and SWWrapSpriteMoveProc no longer exist. Instead, the more generally useful routines SWBounceSprite and SWWrapSprite can be used as part of a moveProc.
+ The BlitPixie... routines have been renamed "BlitPixie8Bit..." to distinguish between the original BlitPixie and the new BlitPixieAllBit blitter.
+ BlitPixieWorldDrawProc and BlitPixieSpriteDrawProc no longer exist; BlitPixie8BitRectDrawProc takes the place of both.
+ SWCreateSpriteFromCicnResource and SWCreateSpriteFromPictResource now require an additional parameter: A pointer to the SpriteWorld that will ultimately contain the Sprite.
+ SWDisposeSpriteWorld now disposes of all the Layers, Sprites and Frames within that SpriteWorld, so you no longer have to manually dispose of these individually before calling SWDisposeSpriteWorld.
+ The coordinates of the Sprites, as used in functions such as SWMoveSprite, are local to the worldRect of the SpriteWorld, rather than to the window containing the SpriteWorld.
+ You must now lock a SpriteWorld (with SWLockSpriteWorld) before drawing anything to the background frame.
+ Compiling SpriteWorld projects now requires Apple's "Universal Headers".
+ The implementation of compiled Sprites is quite different from Myles' last version.
+++ There are many other minor changes and bug fixes, too numerous to list. As I said above, to avoid confusion you should treat this release as a new product, and read through the full documentation.
Things "missing" from this version of SpriteWorld:
+ SpriteWorld now requires a color Mac and System 7.0 or later. This version of SpriteWorld uses GWorlds and other 32 bit Color QuickDraw features, and also the Microseconds() call which was introduced with System 7.
+ Creating Sprites with many Frames using SWCreateSpriteFromPictResource or SWCreateSpriteFromCicnResource is slower than in Myles' original, because creating the GWorlds this SpriteWorld uses is slower than the "hand built" CGrafPorts in Myles' code. This can be overcome (and then some) by using SWCreateSpriteFromSinglePict.
+ SpriteWorld 2 tests a little slower than SpriteWorld 1, especially the PPC versions. However, under more "real world" conditions, with larger numbers of sprites and the animation frame rate controlled with SWSetSpriteWorldMaxFPS(), SpriteWorld 2 isn't significantly slower than SpriteWorld 1.